<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
  <head>
    <base href="<%=basePath%>" />
    <title>User Bill</title>
    <script type="text/javascript">
		var path = "<%=basePath%>";
	</script>
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="cache-control" content="no-cache" />
	<meta http-equiv="expires" content="0" />    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
	<meta http-equiv="description" content="This is my page" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>beshs/css/content.css" />
	<link type="text/css" href="<%=basePath%>beshs/css/frame_style.css" rel="stylesheet" />
	<link type="text/css" href="<%=basePath%>beshs/css/element_style.css" rel="stylesheet" />
	<script type="text/javascript" src="<%=basePath%>resources/jquery/jquery-1.7.2.min.js"></script>
	<!-- 系统通用资源 -->
	<jsp:include page="/resources/resource-refer/common-resource-reference.jsp" />
	<!-- 用户访问菜单路径 -->
	<jsp:include page="/resources/usertrace/common-uservisit-reference.jsp" />
  </head>
  
  <body>
  	<div class="content_all">
  		<!--导航条-->
  		<div class="insertinfo_table">
		  	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  		<tr>
		  			<th style="text-align: center;" colspan="6" >User Bill</th>
		  		</tr>
		  		<tr>
		  			<th>Allocation Name：</th>
		          	<td><s:property value='shareAreaResult.shareName' /></td>
		        	<th>Allocation Period Start</th>
		        	<td>
		        		<s:date name='userShareResult.startDate' format='yyyy-MM-dd' nice='false' />
		        	</td>
		        	<th>Allocation Period End</th>
		        	<td>
		        		<s:date name='userShareResult.endDate' format='yyyy-MM-dd' nice='false' />
		        	</td>
		        </tr>
		        <tr>
		          	<th>Owner Name：</th>
		          	<td><s:property value='heatRoom.roomOwner' /></td>
		          	<th>Apartment Number：</th>
		          	<td><s:property value='heatRoom.houseNo' /></td>
		          	<th>User Correction Factor：</th>
		          	<td>
		          		<s:text name="fmt.number.precision.three">
		          			<s:param value='userShareResult.reviseFactor' />
		          		</s:text>
		          	</td>
		        </tr>
		        <tr>
		        	<th>Building：</th>
		          	<td><s:property value='building.buildingName' /></td>
		          	<th>Unit：</th>
		          	<td><s:property value='buildingUnit.unitName' /></td>
		        	<th>Floor：</th>
		          	<td><s:property value='heatRoom.floorIndex' /></td>
		        </tr>
		    	<tr>
		        	<th>City：</th>
		          	<td>
		          		<s:property value="cityMap.get(provinceCityID)" />
		          			-
		          		<s:property value="cityMap.get(capitalCityID)" />
		          		<s:if test="cityMap.get(districtCityID)!=null">
		          			-
		          			<s:property value="cityMap.get(districtCityID)" />
		          		</s:if>
		          	</td>
		            <th>Project：</th>
		          	<td><s:property value='project.projectName' /></td>
		          	<th>District：</th>
		          	<td><s:property value='community.communityName' /></td>
		        </tr>
		        <tr>
		        	<th>Heating Area：</th>
		          	<td>
		          		<s:text name="fmt.number.precision.three">
		          			<s:param value='userShareResult.structArea' />
		          		</s:text>
		          		m&sup2;
		          	</td>
		          	<th>Total Radiators</th>
		        	<td>
		        		<s:property value="userShareResult.totalSinkAmount" />
		        	</td>
		        	<th>Radiator Weight</th>
		        	<td>
		        		<s:text name="fmt.number.precision.two">
		          			<s:param value="userShareResult.heatSinkWeight" />
		          		</s:text>
		        	</td>
		        </tr>
		        <tr>
		        	<th>Heat Price by Metering：</th>
		          	<td>
		          		<s:text name="fmt.number.precision.four">
		          			<s:param value='shareAreaResult.measureChargePrice' />
		          		</s:text>
		          		<s:if test="shareAreaResult.measureUnit==1">€/MWh</s:if>
		          		<s:if test="shareAreaResult.measureUnit==2">€/kWh</s:if>
		          		<s:if test="shareAreaResult.measureUnit==3">€/Gj</s:if>
		          	</td>
		        	<th>Heat Price by Area：</th>
		          	<td>
		          		<s:text name="fmt.number.precision.four">
		          			<s:param value='shareAreaResult.areaChargePrice' />
		          		</s:text>
		          		€/m&sup2;
		          	</td>
		          	<th>Basic Heat Price：</th>
		          	<td>
		          		<s:text name="fmt.number.precision.four">
		          			<s:param value='shareAreaResult.basePrice' />
		          		</s:text>
		          		€/m&sup2;
		          	</td>
		        </tr>
		        <tr>
		        	<th>Whether Involved in Metering and Charging：</th>
		          	<td>
		          		<s:if test="userShareResult.ifMeasureCharge==1">No</s:if>
		          		<s:if test="userShareResult.ifMeasureCharge==2">Yes</s:if>
		          	</td>
		        	<th>Unit Weight</th>
		        	<td>
		        		<s:text name="fmt.number.precision.eight">
		          			<s:param value="userShareResult.perWeight" />
		          		</s:text>
		        	</td>
		        	<th>Reference Heat Release：</th>
		          	<td>
		          		<s:if test="userShareResult.referHeatConsume < 1">
		          			<s:text name="fmt.number.precision.three">
			          			<s:param value='userShareResult.referHeatConsume * 1000' />
			          		</s:text>
			          		KWh
		          		</s:if>
		          		<s:else>
		          			<s:text name="fmt.number.precision.three">
			          			<s:param value='userShareResult.referHeatConsume' />
			          		</s:text>
			          		MWh
		          		</s:else>
		          	</td>
		        </tr>
		        <tr>
		        	<th>Basic Heating Charge</th>
		        	<td>
		        		￥<s:text name="fmt.number.precision.two">
		          			<s:param value="userShareResult.roomBaseHeatCharge" />
		          		</s:text>
		        	</td>
		        	<th>Shared Heating Cost</th>
		        	<td>
		        		€<s:text name="fmt.number.precision.two">
		          			<s:param value="userShareResult.roomMeasureCharge" />
		          		</s:text>
		        	</td>
		        	<th>Heating Charge by Area</th>
		        	<td>
		        		€<s:text name="fmt.number.precision.two">
		          			<s:param value="userShareResult.roomAreaCharge" />
		          		</s:text>
		        	</td>
		        </tr>
		        <tr>
		        	<th>Total Heating Charge</th>
		        	<td>
		        		€<s:text name="fmt.number.precision.two">
		          			<s:param value="userShareResult.totalChargeAmount" />
		          		</s:text>
		        	</td>
		        	<th>Allocation Proportion</th>
		        	<td>
		        		<s:text name="fmt.number.precision.four">
		          			<s:param value="userShareResult.sharePercent" />
		          		</s:text>
		        	</td>
		        	<th>
		        		Balance<br/>
		        		<font size="2" color="red">
		        			(Balance=Heating Charge by Area-Total Heating Charge)
		        		</font>
		        	</th>
		        	<td>
		        		€<s:text name="fmt.number.precision.two">
		          			<s:param value="userShareResult.balanceAmount" />
		          		</s:text>
		        	</td>
		        </tr>
		        <tr>
		        	<th></th>
          			<td style="border:none" colspan="5">
          				<script type="text/javascript">
          					$(function() {
          						$("input[name='goBack']").click(function() {
          							//window.location = path + "beshs/shareAreaResultAction!queryAreaResultPage.do?date="+new Date();
          							history.go(-1);
          						});
          					})
          				</script>
            			<input name="goBack" type="reset" value="Return" class="s_btn"/></td>
        		</tr>		
		    </table>
		</div>
	</div>
	<div class="clear"></div>
	<div class="content_all">
	  	<!--查询列表-->
	  	<div class="search_table_all">
	    	<table class="search_table" cellspacing="0" cellpadding="0">
	      		<thead>
	        		<tr>
		          		<th style="width:50px;">Serial No.</th>
			          	<th>Radiator No.</th>
			          	<th>Evaluation Coefficient K</th>
			          	<th>Allocator Readings</th>
			          	<th>Radiator Weight</th>
			          	<th>Allocation Proportion</th>
			          	<th>Shared Heating Cost</th>
			          	<th>Reference Heat Release</th>
	        		</tr>
	      		</thead>
	      		<tbody>
	      			<s:iterator value="shareSinkResultList" var="sinkResult" status="status">
	      				<tr>
		          			<td><s:property value="#status.index+1" /></td>
		          			<td><s:property value="#sinkResult.sinkNo" /></td>
		          			<td>
		          				<s:text name="fmt.number.precision.three">
		          					<s:param value="#sinkResult.kfactor" />
		          				</s:text>	
		          			</td>
		          			<td>
		          				<s:text name="fmt.number.precision.two">
		          					<s:param value="#sinkResult.readNum" />
		          				</s:text>
		          			</td>
		          			<td>
		          				<s:text name="fmt.number.precision.two">
		          					<s:param value="#sinkResult.heatSinkWeight" />
		          				</s:text>
		          			</td>
		          			<td>
		          				<s:text name="fmt.number.precision.five">
				          			<s:param value="#sinkResult.sharePercent" />
				          		</s:text>
		          			</td>
		          			<td>
		          				￥<s:text name="fmt.number.precision.two">
				          			<s:param value="#sinkResult.shareChargeAmount" />
				          		</s:text>
		          			</td>
		          			<td>
		          				<s:if test="#sinkResult.referHeatSinkAmount < 1">
				          			<s:text name="fmt.number.precision.three">
					          			<s:param value='#sinkResult.referHeatSinkAmount * 1000' />
					          		</s:text>
					          		KWh
				          		</s:if>
				          		<s:else>
				          			<s:text name="fmt.number.precision.three">
					          			<s:param value='#sinkResult.referHeatSinkAmount' />
					          		</s:text>
					          		MWh
				          		</s:else>
		          			</td>
		        		</tr>
	      			</s:iterator>
	      		</tbody>
	    	</table>
	  	</div>
	</div>
  </body>
</html>
